package com.xiaoxie.boot.dao;

import com.xiaoxie.boot.bean.Role;
import com.xiaoxie.boot.bean.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author xiaoxie
 * @create 2022-03-27 22:56
 */
@Mapper
public interface RoleMapper {

    int insertSelective(Role record);

    int updateByPrimaryKeySelective(Role record);

    Role selectByPrimaryKey(Integer id);

    /**
     * 查询所有角色信息
     * @param role
     * @return
     */
    List<Role> selectAllRole(Role role);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    int deleteRoleByIds(List<String> ids);

    /**
     * 查询角色名是否重名
     * @param roleName
     * @return
     */
    Role selectRoleName(String roleName);
}
